<?php
echo Shop::renderFlash();
//echo '<div class="product-price-info">';
//echo Shop::pricingInfo();
//echo '</div>';

echo CHtml::beginForm(array('shoppingCart/create'));

Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/distributor.js');
?>
<div class="supplier">
   <?php
    echo CHtml::label('Nhà cung cấp:', "");
    echo CHtml::dropDownList('supplier', '',
                        CHtml::listData($model->supplier_product,'supplier_id','user.full_name'), 
                        array()); 
    ?> 
</div>
<div class="supplier">
    <?php
        echo CHtml::label('  Đại lý:', "");
        echo CHtml::dropDownList('distributor', '', 
                        CHtml::listData($model->supplier_product[0]->getDistributor(),'distributor_id','user.full_name'), 
                        array());
    ?>
</div>

<?php if($hasDis!=0): ?>
<div class="addtocart">
    <?php
    echo CHtml::hiddenField('product_id', $model->id);
    echo CHtml::label(Shop::t('Amount'), 'ShoppingCart_amount');
    echo ': ';
    echo CHtml::textField('amount', 1, array('size' => 3));
    echo CHtml::submitButton(Shop::t('Add to shopping Cart'), array( 'class' => 'btn-add-cart'));?>
</div>
<?php endif; ?>
<?php
echo CHtml::endForm();
?>
